const log4js = require('log4js');
log4js.configure({
    appenders: {
        console: { type: 'console' },
        log: { type: 'file', filename: 'log/log.log', pattern: "-yyyy-MM-dd.log", }, 
    },
    categories: {
        default: { appenders: ['log', 'console'], level: 'all' }, 
    }
}); 
const logger = log4js.getLogger('log')

 

function info(message, type) {
    logger.info(message);
}
 

exports.info = info
exports.log = info